#include<iostream>
typedef unsigned char lu_byte;
#define CommonHeader	struct GCObject *next; lu_byte tt; lu_byte marked

typedef struct GCObject {
  CommonHeader;
} GCObject;
typedef struct MyString
{
    CommonHeader;
    char char1;
    char char2;
} MyString;
typedef struct Struct2
{
    CommonHeader;
    double a;
    int b;
}Struct2;

union GCUnion {
  GCObject gc;  /* common header */
  struct MyString myString;
  struct Struct2 struct2;
};


int main()
{
    MyString* myString;
    myString->char1 = 'a';
    myString->char2 = 'b';
    GCObject* gc = &(((union GCUnion *)(myString))->gc);
    char *ptr = (char*)gc;
    int offset = sizeof(GCObject*) + sizeof(lu_byte) * 2;
    std::cout<< *(ptr + offset) << *(ptr + offset + sizeof(char)) << std::endl;
    return 0;
}